package org.example.aaaatest.a1;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Scanner;

import static org.example.aaaatest.a1.DateUtil.TIME_FORMAT_YYYYMM_ZH;
import static org.example.aaaatest.a1.DateUtil.getBeforeMonth;

/**
 * @description:
 * @author: wangbaogui
 * @create: 2025/8/15 15:32
 **/
public class A6 {



        public static void main(String[] args) {
            String lastMonth = DateUtil.getLastMonthWithZh();
            System.out.println("lastMonth = " + lastMonth);

            String format = String.format( "代驾客服服务质量指标达成月维度（%s）", lastMonth);
            System.out.println("format = " + format);
        }

    public static String getLastMonthWithZh(){
        // 获取当前日期时间
        LocalDateTime now = LocalDateTime.now(ZoneId.of("UTC+8"));
        LocalDateTime lastMonthTime = now.minusMonths(1L);
        // 返回时间戳
        return lastMonthTime.format(TIME_FORMAT_YYYYMM_ZH);
    }
}
